package utils;

public class Pair <K,V>{
	public final  K first;
	public final V second;
	
	public Pair(K first, V second) {
		this.first = first;
		this.second = second;
	}

	
	@Override
	public boolean equals(Object obj) {
		if (obj instanceof Pair<?, ?>){
			Pair<?, ?> p = (Pair<?, ?>) obj;
			return this.first.equals(p.first) && this.second.equals(p.second);
		}
		return false;
	}
	
	
	@Override
	public String toString() {
	
		return "[" + first.toString() + "," + second.toString() + "]";
	}
	
	@Override
	public int hashCode() {
		
		return 100*first.hashCode()+second.hashCode();
	}
}
